package com.lanou3g.ptp.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 集中式教学环节下的任务详情实体
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class CentralTaskResult implements Serializable {

    private Long taskId;

    private String teachlinkName;

    private String taskName;

    private String grade;

    private String semester;

    private Double longitude;
    private Double latitude;
    private Double radius;

    /**
     * 实习任务的总体进度
     */
    private Schedule schedule;
    /**
     * 指导教师信息
     */
    private Teacher teacher;
    /**
     * 学分
     */
    private Integer score;
    /**
     * 类型
     */
    private Integer type;
    /**
     * 模式
     */
    private Integer mode;
    /**
     * 实习单位信息
     */
    private Base base;
    /**
     * 参与该任务的学生详情
     */
    private List<Student> students;


    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Schedule implements Serializable {
        private Double rate;
        private Date today;
        private List<Date> dateDetails;
    }

    @Data
    public static class Teacher implements Serializable {
        private String name;
        private String tel;
    }

    @Data
    public static class Base implements Serializable {
        private String name;
        private String contact;
        private String tel;
        private Teacher teacher;
        private String address;
    }

    @Data
    public static class Student implements Serializable {
        private Long id;
        private String no;
        private String name;
        private String clazz;
        private String tel;
        private String head;
        /** 出勤率 */
        private Double attendanceRate;
        private Double dailyRate;
        private Double score;
        private Attendance attendanceToday;
    }

    @Data
    public static class Attendance implements Serializable {
        private Date startTime;
        private Date endTime;
    }

}
